package be.kiojeux.dao.connection;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public final class EMF {
    private static final EntityManagerFactory emfInstance =
        Persistence.createEntityManagerFactory("transactions-optional");

    private EMF() {}

    public static EntityManagerFactory get() {
        return emfInstance;
    }
 // Create EntityManager in others classes
 /*	EntityManager em = EMF.get().createEntityManager();
    try {
        // ... do stuff with em ...
    } finally {
        em.close();
    }
 */
}
